{template "guest_header"}


<script type="text/javascript" src="static/js/cp.js"></script>
<!--{if $this->Config[company_enable]}-->
<!--{eval $d_c_name = $this->Config[default_company] ? $this->Config[default_company] : '单位'; $d_d_name = $this->Config[default_department] ? $this->Config[default_department] : '部门'; $d_j_name = $this->Config[default_job] ? $this->Config[default_job] : '岗位';}-->
<!--{/if}-->

<div class="g-bd">  
  <div class="m-tit">
  资料补全
  </div>

 <div class="m-box">
 <div class="m-help">恭喜您进入最后一步啦：设置如下资料，方便大家了解你</div>
  <div class="m-reg">

  {$menuHTML}

      <form method="post" action="index.php?mod=member&code=do_member_profile" name='reg' id="member_register">
        <table border="0">
		  <!--{if $this->Config[company_enable]}-->
		  <tr>
            <td align="right" valign="middle" width="110">所属{$d_c_name}：</td>
            <td><input type="hidden" name="companyid" id="companyid">
			  <div style="float:left;">{$companyselect}</div>
              <div id="check_company_result" class="error" style="display:none"></div>
			</td>
          </tr>
		  <!--{if $this->Config[department_enable]}-->
		  <tr>
            <td align="right" valign="middle" width="110">所在{$d_d_name}：</td>
            <td><input type="hidden" name="departmentid" id="departmentid">
			  <div style="float:left;" id="departmentselect">{$departmentselect}</div>
              <div id="check_department_result" class="error" style="display:none"></div>
			</td>
          </tr>
		  <!--{/if}-->
		  <tr>
            <td align="right" valign="middle" width="110">任职{$d_j_name}：</td>
            <td><input type="hidden" name="jobid" id="jobid">
			  <div style="float:left;">{$jobselect}</div>
              <div id="check_job_result" class="error" style="display:none"></div>
			</td>
          </tr>
		  <!--{/if}-->

          <!--{if $this->Config[city_status]}-->
          <tr>
            <td width="110" align="right">所在地区：</td>
            <td><div style="float:left;">
                {$province}
              </div>
              <div style="float:left;">
                <select id="city" name="city" onchange="changeCity();Validator.Validate(this.form,3,this.name)">
				<option value=''>请选择</option>
				</select>
              </div>
              <div style="float:left;">
                <select id="area" name="area" onchange="changeArea();" style="display:none">
				<option value=''>请选择</option>
				</select>
              </div>
              <div style="float:left;">
                <select id="street" name="street" style="display:none">
				<option value=''>请选择</option>
				</select>
              </div>
              <span class="u-cl">（可查看同城用户、内容等）</span> 

			  </td>
          </tr>
          <!--{/if}-->
		  
        <!--{loop $profileRegister $key $val}-->
        <tr class="reg_city_area">
          <td width="110" align="right">$val['title']：</td>
          <td>
            <!--{if $val['formtype'] == 'text'}-->
            <input type="text" name="{$key}" class="p1" value="$member[$key]">
            <!--{elseif $val['formtype'] == 'select'}-->
              <!--{if $val['choices']}-->
	            <select name="{$key}" class="select">
	              <!--{eval $choices = explode("\r\n",$val['choices']);}-->
	              <!--{loop $choices $s_k $s_v}-->
	              <!--{eval list($v1,$v2)=explode("|",$s_v);$v2 || $v2=$v1;$select='';if($v1 == $member[$key]) $select="selected"}-->
	              <option value="{$v1}" $select>{$v2}</option>
	              <!--{/loop}-->
	            </select>
              <!--{elseif ('birthcity' == $key)}-->
				  <div style="float:left;">
	                {$b_province_list}
	              </div>
	              <div style="float:left;">
	                <select id="b_city" name="b_city" onchange="changeCity('b');">
	                <option value="0">请选择</option>
					</select>
	              </div>
	              <div style="float:left;">
	                <select id="b_area" name="b_area" onchange="changeArea('b');" style="display: none">
	                <option value="0">请选择</option>
					</select>
	              </div>
	              <div style="float:left;">
	                <select id="b_street" name="b_street" style="display: none">
	                <option value="0">请选择</option>
					</select>
	              </div>
	              <input type="hidden" id="b_hid_city" name="b_hid_city" value="$b_city">
	              <input type="hidden" id="b_hid_area" name="b_hid_area" value="$b_area">
	              <input type="hidden" id="b_hid_street" name="b_hid_street" value="$b_street">
	              <!--{if $op == $k}-->
	              <script type="text/javascript">
	              $(document).ready(function(){changeProvince('b');})
	              </script>
	              <!--{/if}-->
              <!--{/if}-->
            <!--{elseif $val['formtype'] == 'textarea'}-->
            <textarea name="{$key}">$member[$key]</textarea>
            <!--{elseif $val['formtype'] == 'date'}-->
              <script src="static/js/date/WdatePicker.js" type="text/javascript"></script>
              <input class="p1" type="text" name="$key" value="{$member[$key]}" readonly onFocus="WdatePicker({startDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})"/>
            <!--{else}-->
            <!--{/if}-->
          </td>
        </tr>
		<!--{/loop}-->
		<tr>
        <td>&nbsp;</td>
		  <td><input type="submit" class="u-btn u-btn-lg" name="SUBmit" value="确定并进入下一步"><input type="button" class="u-btn u-btn-c4 u-btn-lg" value="跳过该步"  onclick="location.href='{$redirect_to}';" style="margin-left:20px;cursor:pointer;"/></td>
		</tr>
		</table>
      </form>
<SCRIPT LANGUAGE="JavaScript">
function checkdata(){if(!($('#province').val() && $('#city').val())){show_message('您的地区信息没有填写完整',1,'提示','msgBox','msg_alert');}else{show_message('数据提交中，请稍候！');$('#member_register').submit();}}
function changeProvince(b){
  var bb = '';
  if(b) {
	  bb=b+'_';
  }
  var province = document.getElementById(bb+"province").value;
  var url = "ajax.php?mod=member&code=sel&province="+province;
  var myAjax=$.post(
		  	url,
		  	function(d){
	  		    $('#' +bb+ "city").html(d);
				document.getElementById(bb+"street").length = 1;
				document.getElementById(bb+"area").length = 1;
				document.getElementById(bb+"street").style.display = "none";
				document.getElementById(bb+"area").style.display = "none";

		  	}
  );
}
//changeProvince();
function changeCity(b){
  var bb = '';
  if(b) {
	  bb=b+'_';
  }
  var city = document.getElementById(bb+"city").value;
  var url = "ajax.php?mod=member&code=sel&city="+city;
  var myAjax=$.post(
		  	url,
		  	function(d){
				if(d){
					document.getElementById(bb+"area").style.display = "block";
		  		    $('#' +bb+ "area").html(d);
				}else{
					document.getElementById(bb+"area").length = 1;
					document.getElementById(bb+"area").style.display = "none";
				}
				document.getElementById(bb+"street").style.display = "none";
				document.getElementById(bb+"street").length = 1;
		  	}
  );
}
function changeArea(b){
  var bb = '';
  if(b) {
	  bb=b+'_';
  }
  var area = document.getElementById(bb+"area").value;
  var url = "ajax.php?mod=member&code=sel&area="+area;
  var myAjax=$.post(
		  	url,
		  	function(d){
				if(d){
					document.getElementById(bb+"street").style.display = "block";
				    $('#' +bb+ "street").html(d);
				}else{
					document.getElementById(bb+"street").length = 1;
					document.getElementById(bb+"street").style.display = "none";
				}
		  	}
  );
}
</SCRIPT>

</div></div></div></div>

{template "topic_footer"}